package com.lagou.ipersistence.type;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author Yan Jiahong
 * Created on 2020/11/24
 */
public class IntegerTypeHandler extends BaseTypeHandler<Integer>{
    @Override
    public void setNonNullParameter(PreparedStatement ps, int i, Integer parameter, JdbcType jdbcType) throws SQLException {
        ps.setInt(i, parameter);
    }
    
    @Override
    public Integer getNonNullResult(ResultSet rs, String columnName) throws SQLException {
        return rs.getInt(columnName);
    }
}
